<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>String对象</title>
</head>
<body>
按F12查看Console
<script>
    let s = "abcbcdcde";
    console.log(s.charAt(2));//c
    console.log(s.substr(2));//cbcdcde
    console.log(s.substr(2, 4));//cbcd
</script>
</body>
</html>